{template header}
<div class="outWrap">
	<div class="leftMenu">
		<ul>
			<li id="left_menu_score"><h3><a href="index.php?c=user&a=score">我的积分</a></h3></li>
			<li id="left_menu_message" class="on"><h3><a href="index.php?c=message&a=new">消息管理</a></h3></li>
			<li id="left_menu_ask" ><h3><a href="index.php?c=user&a=ask">我的问答</a></h3></li>
			<li id="left_menu_info"><h3><a href="index.php?c=user&a=profile">个人设置</a></h3></li>
			<li id="left_menu_uppw"><h3><a href="index.php?c=user&a=uppass">修改密码</a></h3></li>
		</ul>
	</div>
	<div class="rightCont">
		<div class="userInfo">
		<input type="button" value="发站内消息" name="send_meg" class="btn" onclick="send_msg();" />
			<div class="tags">
				<ul>
					{if  'in'==$folder }
						<li id="myask_menu" class="on"><h3>收件箱</h3></li>
						<li id="myanswer_menu" class><h3><a href="index.php?c=message&a=outbox">发件箱</a></h3></li>
					{else}
						<li id="myask_menu" class><h3><a href="index.php?c=message&a=new">收件箱</a></h3></li>
						<li id="myanswer_menu" class="on"><h3>发件箱</h3></li>
					{/if}
				</ul>
			</div>
			<div class="listCont border">
				<table cellspacing="0" cellpadding="0" width="96%">
					<tr>
					{if $folder == 'in'}
						{if  'new' == $type}
							<td colspan="5" class="qstTitle">&nbsp;({$rownum} 封信)&nbsp;&nbsp; 未读消息&nbsp;|&nbsp;<a href="index.php?c=message&a=personal">私人消息</a>&nbsp;|&nbsp;<a href="index.php?c=message&a=system">系统消息</a> </td>
						{elseif 'personal' == $type}
							<td colspan="5" class="qstTitle">&nbsp;({$rownum} 封信)&nbsp;&nbsp;<a href="index.php?c=message&a=new">未读消息</a>&nbsp;|&nbsp;私人消息&nbsp;|&nbsp;<a href="index.php?c=message&a=system">系统消息</a> </td>
						{else}
							<td colspan="5" class="qstTitle">&nbsp;({$rownum} 封信)&nbsp;&nbsp;<a href="index.php?c=message&a=new">未读消息</a>&nbsp;|&nbsp;<a href="index.php?c=message&a=personal">私人消息</a>&nbsp;|&nbsp;系统消息</td>
						{/if}
					{else}
						<td colspan="5" class="qstTitle">&nbsp;({$rownum}封信)</td>
					{/if}
					</tr>
					{if $folder == 'in'}
					<tr>
						<th>标题</th>
						<th>发送时间</th>
						<th>发件人</th>
						<th>状态</th>
						<th>删除</th>
					</tr>
					{loop $messagelist $message}
					<tr>
						<td class="qstTitle"><a href="{url message/view/$message['id']}">{$message['subject']}</a></td>
						<td class="num">{$message['time']}</td>
						<td><a href="{url user/space/$message['fromuid']}" target="_blank">{$message['from']}</a></td>
						<td>{if 0==$message['new']}已读{else}<font color="red">未读</font>{/if}</td>
						<td><a href="{url message/remove/$message['id']}">删除</a></td>
					</tr>
					{/loop}
					{else}
						<tr>
							<th>标题</th>
							<th>发送时间</th>
							<th>删除</th>
						</tr>
						{loop $messagelist $message}
						<tr>
							<td class="qstTitle"><a href="{url message/view/$message['id']/out}">{$message['subject']}</a></td>
							<td>{$message['time']}</td>
							<td><a href="{url message/remove/$message['id']}">删除</a></td>
						</tr>
						{/loop}
					{/if}
				</table>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
function send_msg(){
	document.location.href='index.php?c=message&a=send';
}
</script>
{template footer}